package com.mjlf.mr.speed;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.lib.partition.HashPartitioner;


public class SpeedParation extends HashPartitioner<Speed, Text> {

    @Override
    public int getPartition(Speed key, Text value, int numReduceTasks) {
        return key.getTime().hashCode() % numReduceTasks;
    }
}
